import React, { Component } from 'react'

export default class Top extends Component {
  
  render() {

    //父把数据传递给子时 子通过this.props接收一下
   /*  console.log(this.props); */
    
    let {sup,opp} = this.props
    return (
      <div>
        <h2>标题:{this.props.title}</h2>
        <p>参与总人数:{sup+opp}</p>
      </div>
    )
  }
}
